import React from 'react';

import Constants from '../../common/Constants';

import PostRequestContentAction from '../post/PostRequestContentAction';

export default class HeartExpertsTodayListAction extends PostRequestContentAction{
  constructor(props) {
    super(props);

    this.moduleType = Constants.MODULE_TYPE.HEART;
    this.name = "HeartExpertsTodayListAction";
  }
  finish(data, isSucceed, response) {
      if(isSucceed&&data) {
        let dic ={viewStatus: 3,isResponeUpdate: true,}
        let dataKey = this.data.dataKey||'data';
        dic[dataKey]=data;
        this.caller.setState(dic)
        this.onFinishSuccess(data, response);
      }
      else if (response) {
        if(response.status == 401) {
          this._dealUnauthorized(this.caller);
        }
        else {
          this.caller.setState({viewStatus: response.status})
        }
      }
      else {
        this.caller.setState({viewStatus: 400})
      }
    }

    onFinishSuccess(data, response){

    }
}
